\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder}{\section{strange.\-extensions.\-injector.\-api.\-I\-Injection\-Binder Interface Reference}
\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder}\index{strange.\-extensions.\-injector.\-api.\-I\-Injection\-Binder@{strange.\-extensions.\-injector.\-api.\-I\-Injection\-Binder}}
}


A Binder that implements Dependency Injection in Strange\-Io\-C.  


Inheritance diagram for strange.\-extensions.\-injector.\-api.\-I\-Injection\-Binder\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.111111cm]{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
object \hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_aac899bd51070e8565fabab3a248cf3a5}{Get\-Instance} (Type key, object name)
\begin{DoxyCompactList}\small\item\em Retrieve an Instance based on a key/name combo. \end{DoxyCompactList}\item 
T \hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_ae9edea5e4babff105ec4767d84c6b716}{Get\-Instance$<$ T $>$} (object name)
\begin{DoxyCompactList}\small\item\em Retrieve an Instance based on a key/name combo. \end{DoxyCompactList}\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_ac9376845ce4eefd9e2795a6899f48c25}{int \hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_ac9376845ce4eefd9e2795a6899f48c25}{Reflect} (List$<$ Type $>$ list)}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_ac9376845ce4eefd9e2795a6899f48c25}

\begin{DoxyCompactList}\small\item\em Reflect all the types in the list Return the number of types in the list, which should be equal to the list length. \end{DoxyCompactList}\item 
int \hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_a4f5f1efc3286ca4358d6ca9443c0f1d2}{Reflect\-All} ()
\begin{DoxyCompactList}\small\item\em Reflect all the types currently registered with Injection\-Binder Return the number of types reflected, which should be equal to the number of concrete classes you've mapped. \end{DoxyCompactList}\item 
void \hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_a15c29624d07058e29487fa0713b806a3}{Resolve\-Binding} (\hyperlink{interfacestrange_1_1framework_1_1api_1_1_i_binding}{I\-Binding} binding, object key)
\begin{DoxyCompactList}\small\item\em Places individual Bindings into the bindings Dictionary as part of the resolving process \end{DoxyCompactList}\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_a7faee07278ae6f408125b2f5bfe3e380}{\hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding}{I\-Injection\-Binding} {\bfseries Bind$<$ T $>$} ()}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_a7faee07278ae6f408125b2f5bfe3e380}

\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_afd394dfe8af8c8678ba48e7badf55f8f}{\hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding}{I\-Injection\-Binding} {\bfseries Bind} (Type key)}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_afd394dfe8af8c8678ba48e7badf55f8f}

\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_a5602ebd8283eb4d8a44a3346cd56be81}{\hyperlink{interfacestrange_1_1framework_1_1api_1_1_i_binding}{I\-Binding} {\bfseries Bind} (object key)}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_a5602ebd8283eb4d8a44a3346cd56be81}

\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_a3284a844e2b20f7759bcb29c3a0b5098}{\hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding}{I\-Injection\-Binding} {\bfseries Get\-Binding$<$ T $>$} ()}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_a3284a844e2b20f7759bcb29c3a0b5098}

\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_ac5a29e83edcc8653f68504bf9a28fdb8}{\hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding}{I\-Injection\-Binding} {\bfseries Get\-Binding$<$ T $>$} (object name)}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_ac5a29e83edcc8653f68504bf9a28fdb8}

\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_a03bbd85028a59b540e048a247472caed}{\hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding}{I\-Injection\-Binding} {\bfseries Get\-Binding} (object key)}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_a03bbd85028a59b540e048a247472caed}

\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_aa7e0730fe532ac26248969e0c2b46c9c}{\hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding}{I\-Injection\-Binding} {\bfseries Get\-Binding} (object key, object name)}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_aa7e0730fe532ac26248969e0c2b46c9c}

\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_ac4664b1d4c85a04a30b74dd6cb1e5823}{void {\bfseries Unbind$<$ T $>$} ()}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_ac4664b1d4c85a04a30b74dd6cb1e5823}

\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_aa9f3e3392d79e7de66156e0aac3c09d7}{void {\bfseries Unbind$<$ T $>$} (object name)}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_aa9f3e3392d79e7de66156e0aac3c09d7}

\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_a528878415d61df7631451d67995b6802}{void {\bfseries Unbind} (object key)}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_a528878415d61df7631451d67995b6802}

\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_a747ae97eefa361ad288bd230613ac2a8}{void {\bfseries Unbind} (object key, object name)}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_a747ae97eefa361ad288bd230613ac2a8}

\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_af22c6abf41c878999ea337f0ad093b62}{void {\bfseries Unbind} (\hyperlink{interfacestrange_1_1framework_1_1api_1_1_i_binding}{I\-Binding} binding)}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_af22c6abf41c878999ea337f0ad093b62}

\end{DoxyCompactItemize}
\subsection*{Properties}
\begin{DoxyCompactItemize}
\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_a372922eecd2526bfeaa5d802526cef44}{\hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injector}{I\-Injector} \hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_a372922eecd2526bfeaa5d802526cef44}{injector}\hspace{0.3cm}{\ttfamily  \mbox{[}get, set\mbox{]}}}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_a372922eecd2526bfeaa5d802526cef44}

\begin{DoxyCompactList}\small\item\em Get or set an Injector to use. By default, Injector instantiates it's own, but that can be overridden. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
A Binder that implements Dependency Injection in Strange\-Io\-C. 

Keys in this Binder are always Types, that is, they represent either Classes or Interfaces, not values. Values may be either Types or values, depending on the situation.

The nature of the instance returned by {\ttfamily \hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_aac899bd51070e8565fabab3a248cf3a5}{Get\-Instance()}} depends on how that Key was mapped.

examples\-:

//\-Returns a new instance of Simple\-Interface\-Implementer.

{\ttfamily Bind$<$I\-Simple\-Interface$>$().To$<$Simple\-Interface\-Implementer$>$();}

//\-Returns a Singleton instance of Simple\-Interface\-Implementer.

{\ttfamily Bind$<$I\-Simple\-Interface$>$().To$<$Simple\-Interface\-Implementer$>$().To\-Singleton();}

//\-Returns a Singleton instance of Simple\-Interface\-Implementer.

{\ttfamily Bind$<$I\-Simple\-Interface$>$().To\-Value(new Simple\-Interface\-Implementer());}

//\-Returns the value 42.

{\ttfamily Bind$<$int$>$().To\-Value(42);}

//\-Returns a named instance of Simple\-Interface\-Implementer for those whose //injections specify this name. Note that once requested, this //same instance will be returned on any future request for that named instance.

{\ttfamily Bind$<$I\-Simple\-Interface$>$().To$<$Simple\-Interface\-Implementer$>$().To\-Name(Some\-Enum.\-M\-Y\-\_\-\-E\-N\-U\-M);}

//\-Raises an Exception. string does not Implement I\-Simple\-Interface.

{\ttfamily Bind$<$I\-Simple\-Interface$>$().To$<$string$>$();}

\begin{DoxySeeAlso}{See Also}
\hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding}{strange.\-extensions.\-injector.\-api.\-I\-Injection\-Binding} 
\end{DoxySeeAlso}


\subsection{Member Function Documentation}
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_aac899bd51070e8565fabab3a248cf3a5}{\index{strange\-::extensions\-::injector\-::api\-::\-I\-Injection\-Binder@{strange\-::extensions\-::injector\-::api\-::\-I\-Injection\-Binder}!Get\-Instance@{Get\-Instance}}
\index{Get\-Instance@{Get\-Instance}!strange::extensions::injector::api::IInjectionBinder@{strange\-::extensions\-::injector\-::api\-::\-I\-Injection\-Binder}}
\subsubsection[{Get\-Instance}]{\setlength{\rightskip}{0pt plus 5cm}object strange.\-extensions.\-injector.\-api.\-I\-Injection\-Binder.\-Get\-Instance (
\begin{DoxyParamCaption}
\item[{Type}]{key, }
\item[{object}]{name}
\end{DoxyParamCaption}
)}}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_aac899bd51070e8565fabab3a248cf3a5}


Retrieve an Instance based on a key/name combo. 

ex. {\ttfamily injection\-Binder.\-Get(typeof(\-I\-Some\-Interface), Some\-Enum.\-M\-Y\-\_\-\-E\-N\-U\-M);} 

Implemented in \hyperlink{classstrange_1_1extensions_1_1injector_1_1impl_1_1_injection_binder_af695f0c65ded51228d02afc0374bacd5}{strange.\-extensions.\-injector.\-impl.\-Injection\-Binder}.

\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_ae9edea5e4babff105ec4767d84c6b716}{\index{strange\-::extensions\-::injector\-::api\-::\-I\-Injection\-Binder@{strange\-::extensions\-::injector\-::api\-::\-I\-Injection\-Binder}!Get\-Instance$<$ T $>$@{Get\-Instance$<$ T $>$}}
\index{Get\-Instance$<$ T $>$@{Get\-Instance$<$ T $>$}!strange::extensions::injector::api::IInjectionBinder@{strange\-::extensions\-::injector\-::api\-::\-I\-Injection\-Binder}}
\subsubsection[{Get\-Instance$<$ T $>$}]{\setlength{\rightskip}{0pt plus 5cm}T {\bf strange.\-extensions.\-injector.\-api.\-I\-Injection\-Binder.\-Get\-Instance}$<$ T $>$ (
\begin{DoxyParamCaption}
\item[{object}]{name}
\end{DoxyParamCaption}
)}}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_ae9edea5e4babff105ec4767d84c6b716}


Retrieve an Instance based on a key/name combo. 

ex. {\ttfamily injection\-Binder.\-Get$<$c\-I\-Some\-Interface$>$(Some\-Enum.\-M\-Y\-\_\-\-E\-N\-U\-M);} 

Implemented in \hyperlink{classstrange_1_1extensions_1_1injector_1_1impl_1_1_injection_binder_a39f1604a085f9d386adff244a7ad4e69}{strange.\-extensions.\-injector.\-impl.\-Injection\-Binder}.

\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_a4f5f1efc3286ca4358d6ca9443c0f1d2}{\index{strange\-::extensions\-::injector\-::api\-::\-I\-Injection\-Binder@{strange\-::extensions\-::injector\-::api\-::\-I\-Injection\-Binder}!Reflect\-All@{Reflect\-All}}
\index{Reflect\-All@{Reflect\-All}!strange::extensions::injector::api::IInjectionBinder@{strange\-::extensions\-::injector\-::api\-::\-I\-Injection\-Binder}}
\subsubsection[{Reflect\-All}]{\setlength{\rightskip}{0pt plus 5cm}int strange.\-extensions.\-injector.\-api.\-I\-Injection\-Binder.\-Reflect\-All (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_a4f5f1efc3286ca4358d6ca9443c0f1d2}


Reflect all the types currently registered with Injection\-Binder Return the number of types reflected, which should be equal to the number of concrete classes you've mapped. 



Implemented in \hyperlink{classstrange_1_1extensions_1_1injector_1_1impl_1_1_injection_binder_a5a03e345237a56af33953e215852526b}{strange.\-extensions.\-injector.\-impl.\-Injection\-Binder}.

\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_a15c29624d07058e29487fa0713b806a3}{\index{strange\-::extensions\-::injector\-::api\-::\-I\-Injection\-Binder@{strange\-::extensions\-::injector\-::api\-::\-I\-Injection\-Binder}!Resolve\-Binding@{Resolve\-Binding}}
\index{Resolve\-Binding@{Resolve\-Binding}!strange::extensions::injector::api::IInjectionBinder@{strange\-::extensions\-::injector\-::api\-::\-I\-Injection\-Binder}}
\subsubsection[{Resolve\-Binding}]{\setlength{\rightskip}{0pt plus 5cm}void strange.\-extensions.\-injector.\-api.\-I\-Injection\-Binder.\-Resolve\-Binding (
\begin{DoxyParamCaption}
\item[{{\bf I\-Binding}}]{binding, }
\item[{object}]{key}
\end{DoxyParamCaption}
)}}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder_a15c29624d07058e29487fa0713b806a3}


Places individual Bindings into the bindings Dictionary as part of the resolving process 

Note that while some Bindings may store multiple keys, each key takes a unique position in the bindings Dictionary.

Conflicts in the course of fluent binding are expected, but Get\-Binding will throw an error if there are any unresolved conflicts. 

Implemented in \hyperlink{classstrange_1_1extensions_1_1injector_1_1impl_1_1_cross_context_injection_binder_ad93ea865f14a6249af575633f6472a7e}{strange.\-extensions.\-injector.\-impl.\-Cross\-Context\-Injection\-Binder}.



The documentation for this interface was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
Strange\-Io\-C/scripts/strange/extensions/injector/api/I\-Injection\-Binder.\-cs\end{DoxyCompactItemize}
